package com.bankcard.bininfo.storage;

import com.bankcard.bininfo.trie.RedisTrieStorage;
import com.bankcard.bininfo.trie.TrieStorage;
import com.bankcard.util.RedisClient;

public class RedisStorageProvider implements StorageProvider {
    private final RedisClient redisClient;

    public RedisStorageProvider() {
        this.redisClient = new RedisClient();
    }

    @Override
    public BinInfoStorage createBinInfoStorage() {
        return new RedisBinInfoStorage(redisClient);
    }

    @Override
    public TrieStorage createTrieStorage() {
        return new RedisTrieStorage(redisClient);
    }
}